package com.linjj.seckill.vo;

import com.linjj.seckill.validator.IsPhone;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

public class LoginVo {
    @NotBlank(message = "手机号码不能为空")
    @NotNull(message = "手机号码不能为空")
    @IsPhone
    private String phone;//电话号码，用户id
    @NotBlank(message = "密码不能为空")
    @NotNull(message = "密码不能为空")
    @Length(min = 32,message = "数据包被篡改！请联系管理员！")//经过md5加密后传输的密码长度应为32位
    private String password;

    public LoginVo(){}
    public LoginVo(String phone, String password) {
        this.phone = phone;
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
